MATLAB Function Reference    
who, whos

List the variables in the workspace

Graphical Interface

As an alternative to whos, use the Workspace browser. To open it, select Workspace from the View menu in the MATLAB desktop.

Syntax

Description

who lists the variables currently in the workspace.

whos lists the current variables and their sizes and types. It also reports the totals for sizes.

who('global') and whos('global') list the variables in the global workspace.

who('-file','filename') and whos('-file','filename') list the variables in the specified MAT-file filename. Use the full path for filename.

who('var1','var2',...) and whos('var1','var2',...) restrict the display to the variables specified. The wildcard character * can be used to display variables that match a pattern. For example, who('A*') finds all variables in the current workspace that start with A.

who('-file','filename','var1','var2',...) and
whos('-file','filename','var1','var2',...)
list the specified variables in the MAT-file filename. The wildcard character * can be used to display variables that match a pattern.

s = who(...) returns a cell array containing the names of the variables in the workspace or file and assigns it to the variable s.

s = whos(...) returns a structure with these fields

and assigns it to the variable s.

who -file filename var1 var2 ... and whos -file filename var1 var2 ... are the unquoted forms of the syntax.

See Also

assignin, dir, evalin, exist, what, workspace


 whitebg wilkinson